package com.xx.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.xx.domain.SysLog;
import com.xx.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author : 徐闯 ssm_admin
 * @Date : 2021-05-20 12:05:47
 * @Description : 查看日志信息
 **/
@Controller
@RequestMapping("/sysLog")
public class SystemLogController {
    @Autowired
    private SysLogService sysLogService;
    @RequestMapping("/findALl")
    @ResponseBody
    public PageInfo findALl(@RequestParam(value="num",defaultValue="1") int num, @RequestParam(value="size",defaultValue="10") int size){
        return sysLogService.findALl(num,size);
    }
    @RequestMapping("/deleteOne")
    @ResponseBody
    public int deleteOne(String logId){
        return sysLogService.deleteOne(logId);
    }
    @RequestMapping("/deleteList")
    @ResponseBody
    public int deleteList(String logIds[]){
        return sysLogService.deleteList(logIds);
    }
}
